package example.pattern.bridge;

public class LineDisplayImplementor extends DisplayImplementor {
	private int length = 0;

	public LineDisplayImplementor(String content) {
		super(content);
		length = content.length();
	}

	@Override
	public void printHeader() {
		printLine();
		System.out.println();
	}

	@Override
	public void printContent() {
		System.out.println(content);
	}

	@Override
	public void printFooter() {
		printLine();
		System.out.println();
	}

	private void printLine() {
		for (int i = 0; i < length; i++) {
			System.out.print('-');
		}
	}

}
